package io.renren.modules.medical.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.medical.validator.EnumValue;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 随访阶段实体
 * @author luosheng
 * @date 2023-05-28 23:06:57
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("visit_record_step")
public class VisitRecordStepEntity extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 随访记录的id
	 */
	@NotNull(message = "添加不能没有随访记录id", groups = {AddGroup.class})
	private Long visitRecordId;
	/**
	 * 随访标题
	 */
	@NotBlank(message = "随访标题不能为空", groups = {UpdateGroup.class, AddGroup.class})
	private String visitTitle;
	/**
	 * 随访内容
	 */
	@Null(message = "修改时不用带上随访记录id", groups = {AddGroup.class})
	@NotBlank(message = "修改时随访内容不能为空", groups = {UpdateGroup.class})
	private String visitContent;
	/**
	 * 回复内容
	 */
	@Null(message = "添加时不能包含回复内容", groups = {AddGroup.class})
	private String replyContent;
	/**
	 * 访问状态0：待访问，1：未完成，2：已完成
	 */
	@Null(message = "添加时不用带上随访记录id", groups = {AddGroup.class})
	@EnumValue(intValues = {0, 1, 2}, message = "修改状态时，status必须为指定值", groups = {UpdateGroup.class})
	private Integer status;
	/**
	 * 第几步骤
	 */
	@Null(message = "修改时不用指定是第几步骤", groups = {UpdateGroup.class, AddGroup.class})
	private Integer visitStep;
	/**
	 * 回复时间
	 */
	@Null(message = "修改时不用指定回复时间", groups = {UpdateGroup.class, AddGroup.class})
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
	private Date replyTime;


}
